package com.lp.handler;

import cn.hutool.json.JSONUtil;
import com.lp.canal.EntryHandler;
import com.lp.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author 10263
 */
@Service
@Slf4j
public class UserHandler implements EntryHandler<User> {


    @Override
    public void insert(User columns) {
        log.info("积分添加数据 {}", JSONUtil.toJsonStr(columns));
    }

    @Override
    public void update(User before, User after) {
        log.info("积分修改数据 修改前==={} 修改后====={}", JSONUtil.toJsonStr(before), JSONUtil.toJsonStr(after));

    }

    @Override
    public void delete(User columns) {
        log.info("积分删除数据 {}", JSONUtil.toJsonStr(columns));

    }


}
